openFile

fun KiteDoc.openFile(path: String, password: String = "", epubSettings: EpubSettings = EpubSettings()): KiteDocument

Reads the file at path and opens it as whichever format it is.

The Kotlin/Native desktop and Android-NDK targets have no java.io and no Foundation, so this goes through stdio. The whole file is read into memory, like every other source.

Throws

when the file cannot be read, or is neither a PDF nor an EPUB.